import CustomSelect from "@/views/tool/build/components/CustomSelect.vue";
import CustomCheckbox from "@/views/tool/build/components/CustomCheckbox.vue";
import CustomRadio from "@/views/tool/build/components/CustomRadio.vue";
import CustomUpload from "@/views/tool/build/components/CustomUpload.vue";
export default {
  install(Vue) {
    // 引入所有需要注册的全局组件
    //定义一个数组结构
    const components = [
      { name: "CustomSelect", component: CustomSelect },
      { name: "CustomCheckbox", component: CustomCheckbox },
      { name: "CustomRadio", component: CustomRadio },
      { name: "CustomUpload", component: CustomUpload },
    ];
    //遍历数组进行循环注册
    components.forEach((component) => {
      Vue.component(component.name, component.component);
    });
  },
};
